<?php
namespace app\common\component\user_wallet_log;

class UserWalletLogValidate extends \think\Validate {
	public function create($data) {
		$this -> rule([
			'to_user_name' => 'require',
			'price' => 'require'
		]);

		$this -> message([
			'to_user_name.require' => '会员账号必须填写',
			'price.require' => '金额必须填写'
		]);

		return $this -> checkData($data);
	}
	
	public function checkData($data) {
		if($this -> check($data)) {
    		return [
				'code' => 0,
				'message' => 'Success'
			];
    	}

    	return [
			'code' => -1,
			'message' => $this -> getError()
		];
	}
}
?>